package pl.edu.agh.iosr.ftpserverremote.iprestrictor;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Savepoint;
import java.sql.Statement;
import java.util.Map;

/**
 * 
 * @author Tomasz Sadura
 *
 */
public class FakeConnection implements Connection {

  private final String[][] data;

  public FakeConnection(final String[][] data) {
    this.data = data;
  }

  public void clearWarnings() throws SQLException {

  }

  public void close() throws SQLException {

  }

  public void commit() throws SQLException {

  }

  public Statement createStatement() throws SQLException {
    return new FakeStatement( data );
  }

  public Statement createStatement( final int resultSetType, final int resultSetConcurrency )
      throws SQLException
  {
    return null;
  }

  public Statement createStatement( final int resultSetType,
                                    final int resultSetConcurrency,
                                    final int resultSetHoldability ) throws SQLException
  {
    return null;
  }

  public boolean getAutoCommit() throws SQLException {
    return false;
  }

  public String getCatalog() throws SQLException {
    return null;
  }

  public int getHoldability() throws SQLException {
    return 0;
  }

  public DatabaseMetaData getMetaData() throws SQLException {
    return null;
  }

  public int getTransactionIsolation() throws SQLException {
    return 0;
  }

  public Map<String, Class<?>> getTypeMap() throws SQLException {
    return null;
  }

  public SQLWarning getWarnings() throws SQLException {
    return null;
  }

  public boolean isClosed() throws SQLException {
    return false;
  }

  public boolean isReadOnly() throws SQLException {
    return false;
  }

  public String nativeSQL( final String sql ) throws SQLException {
    return null;
  }

  public CallableStatement prepareCall( final String sql ) throws SQLException {
    return null;
  }

  public CallableStatement prepareCall( final String sql,
                                        final int resultSetType,
                                        final int resultSetConcurrency ) throws SQLException
  {
    return null;
  }

  public CallableStatement prepareCall( final String sql,
                                        final int resultSetType,
                                        final int resultSetConcurrency,
                                        final int resultSetHoldability ) throws SQLException
  {
    return null;
  }

  public PreparedStatement prepareStatement( final String sql ) throws SQLException {
    return null;
  }

  public PreparedStatement prepareStatement( final String sql, final int autoGeneratedKeys )
      throws SQLException
  {
    return null;
  }

  public PreparedStatement prepareStatement( final String sql, final int[] columnIndexes )
      throws SQLException
  {
    return null;
  }

  public PreparedStatement prepareStatement( final String sql, final String[] columnNames )
      throws SQLException
  {
    return null;
  }

  public PreparedStatement prepareStatement( final String sql,
                                             final int resultSetType,
                                             final int resultSetConcurrency )
      throws SQLException
  {
    return null;
  }

  public PreparedStatement prepareStatement( final String sql,
                                             final int resultSetType,
                                             final int resultSetConcurrency,
                                             final int resultSetHoldability )
      throws SQLException
  {
    return null;
  }

  public void releaseSavepoint( final Savepoint savepoint ) throws SQLException {

  }

  public void rollback() throws SQLException {

  }

  public void rollback( final Savepoint savepoint ) throws SQLException {

  }

  public void setAutoCommit( final boolean autoCommit ) throws SQLException {

  }

  public void setCatalog( final String catalog ) throws SQLException {

  }

  public void setHoldability( final int holdability ) throws SQLException {

  }

  public void setReadOnly( final boolean readOnly ) throws SQLException {

  }

  public Savepoint setSavepoint() throws SQLException {
    return null;
  }

  public Savepoint setSavepoint( final String name ) throws SQLException {
    return null;
  }

  public void setTransactionIsolation( final int level ) throws SQLException {

  }

  public void setTypeMap( final Map<String, Class<?>> map ) throws SQLException {

  }
}
